package vn.edu.ute.pojo;

import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name="DoanKhoa")
public class DoanKhoa {
	@Id
	@Column(name="MaDoanKhoa",length=30,nullable=false )
	private String maDoanKhoa;
	@Column(name="TenDoanKhoa",length=200,nullable=false )
	private String tenDoanKhoa;
	@OneToMany(mappedBy="doanKhoa")
	private Set<ChiDoan> dsChiDoan;
	public DoanKhoa(String maDoanKhoa, String tenDoanKhoa,
			Set<ChiDoan> dsChiDoan) {
		super();
		this.maDoanKhoa = maDoanKhoa;
		this.tenDoanKhoa = tenDoanKhoa;
		this.dsChiDoan = dsChiDoan;
	}
	public DoanKhoa() {
		super();
	}
	public String getMaDoanKhoa() {
		return maDoanKhoa;
	}
	public void setMaDoanKhoa(String maDoanKhoa) {
		this.maDoanKhoa = maDoanKhoa;
	}
	public String getTenDoanKhoa() {
		return tenDoanKhoa;
	}
	public void setTenDoanKhoa(String tenDoanKhoa) {
		this.tenDoanKhoa = tenDoanKhoa;
	}
	public Set<ChiDoan> getDsChiDoan() {
		return dsChiDoan;
	}
	public void setDsChiDoan(Set<ChiDoan> dsChiDoan) {
		this.dsChiDoan = dsChiDoan;
	}
	
}
